package com.gdteam.kernel.domain;

import java.util.Collection;

import javax.persistence.PersistenceException;

public interface DomainModelDAO<T> {

     Long count(String fqn) throws PersistenceException ;
    
     void save(Domain domain) throws PersistenceException ;
    
     void update(Domain domain) throws PersistenceException ;
    
     void save(Collection<T> domains) throws PersistenceException;
    
     void delete(Collection<T> domains) throws PersistenceException;
    
     void delete(T domain) throws PersistenceException;
    
     void update(Collection<T> domains) throws PersistenceException;
    
     void deleteAll(String fqn) throws PersistenceException;
    
     Collection<T> getAll(String fqn) throws PersistenceException;
    
     Domain get(Class<T> class1, Long id, boolean readonly);
    
}
